package com.zjt.pictureselector.model;

import android.text.TextUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2017</p>
 * <P>Company: </p>
 *
 * @author zhengjianting
 * @time 2017/11/10 0010 下午 5:21
 */

public class FolderBean {

    private String folderName;
    private List<MediaBean> mediaBeanList;

    public FolderBean(String folderName) {
        this.folderName = folderName;
    }

    public FolderBean(String folderName, List<MediaBean> mediaBeanList) {
        this.folderName = folderName;
        this.mediaBeanList = mediaBeanList;
    }

    public String getFolderName() {
        return folderName;
    }

    public void setFolderName(String folderName) {
        this.folderName = folderName;
    }

    public List<MediaBean> getMediaBeanList() {
        return mediaBeanList;
    }

    public void setMediaBeanList(List<MediaBean> mediaBeanList) {
        this.mediaBeanList = mediaBeanList;
    }

    public void addMediaBean(MediaBean mediaBean) {
        if (mediaBean != null && !TextUtils.isEmpty(mediaBean.getPath())) {
            if (mediaBeanList == null) {
                mediaBeanList = new ArrayList<>();
            }
            mediaBeanList.add(mediaBean);
        }
    }
}
